{extend name='main'}

{block name="button"}
<!--{if auth("add")}-->
<button data-modal='{:url("add")}' data-title="添加设备" class='layui-btn layui-btn-sm layui-btn-primary'>添加设备</button>
<!--{/if}-->
{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='equip/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='text-center'>ID</th>
            <th class='text-center'>设备名称</th>
            <th class='text-center'>设备ID</th>
            <th class='text-center'>通道ID</th>
            <th class='text-center'>通道名称</th>
            <th class='text-center'>出入口</th>
            <th class='text-center'>位置</th>
            <th class='text-center'>ip地址</th>
            <th class='text-center'>技能</th>
            <th class='text-center'>设备状态</th>
            <th class='text-center'>建立日期</th>
            <th class='text-center'>门店</th>
            <th class='text-center'>备注</th>
            <th class='text-center'>异常通知</th>
            <th class='text-center' width="100px">操作</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {volist name="list" id="vo" key='key'}
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='' type='checkbox'></label>
            </td>
            <td class='text-center'>{$vo.id|default=''}</td>
            <td class='text-center'>{$vo.name|default='-'}</td>
            <td class='text-center'>{$vo.equip_id|default='-'}</td>
            <td class='text-center'>{$vo.channel_id|default='-'}</td>
            <td class='text-center'>{$vo.channel_name|default='-'}</td>
            <td class='text-center'>{$vo.is_come_title|default='-'}</td>
            <td class='text-center'>{$vo.position|default='-'}</td>
            <td class='text-center'>{$vo.ip|default='-'}</td>
            <td class='text-center'>{$vo.skill|default='-'}</td>
            <td class='text-center'>
                <span style="" {eq name='$vo.status' value='1' } class="color-green" {else} class="color-red" {/eq}> {$vo.status_title}</span>
            </td>
            <td class='text-center'>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
            <td class='text-center'>{$vo.shop_name|default='-'}</td>
            <td class='text-center'  data-tips-text="{$vo.remark|default='-'}">{$vo.remark|omit|default='-'}</td>
            <td class='text-center'>
                <!--{if auth("abnormal")}-->
                <a class="layui-btn layui-btn-normal  layui-btn-xs" data-title="异常查看"
                   data-open='{:url("abnormal")}?channel_id={$vo.channel_id}&device_id={$vo.equip_id}'>查 看</a>
                <!--{/if}-->
            </td>
            <td class='text-center'>
                <!--{if auth("edit")}-->
                <a data-dbclick class="layui-btn  layui-btn-xs" data-title="编辑设备"
                   data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
                <!--{/if}-->
                <!--{if auth("remove")}-->
                <a class="layui-btn layui-btn-danger layui-btn-xs" data-confirm="确定要删除门店吗?"
                   data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
                <!--{/if}-->
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}